Skip to content

Comments

Adds QAT ConvBN fuse pass to utils#17599

Open
JakeStevens wants to merge 3 commits intopytorch:mainfrom
JakeStevens:export-D93904683
Open

Adds QAT ConvBN fuse pass to utils#17599
JakeStevens wants to merge 3 commits intopytorch:mainfrom
JakeStevens:export-D93904683

Conversation

@JakeStevens
Copy link
Contributor

@JakeStevens JakeStevens commented Feb 20, 2026

Summary:
Earlier PR adds support for a pass that quantizes the bias resulting from QAT ConvBN fusion without an initial bias.

This PR adds it to the NXP calibrate_and_quantize method.

Differential Revision: D93904683

cc @robert-kalmar @digantdesai

@pytorch-bot
Copy link

pytorch-bot bot commented Feb 20, 2026

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/17599

Note: Links to docs will display an error until the docs builds have been completed.

❌ 11 New Failures

As of commit b42fe75 with merge base 746db5f (image):

NEW FAILURES - The following jobs have failed:

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@meta-cla meta-cla bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Feb 20, 2026
@meta-codesync
Copy link
Contributor

meta-codesync bot commented Feb 20, 2026

@JakeStevens has exported this pull request. If you are a Meta employee, you can view the originating Diff in D93904683.

Summary:

Make the NXP test_batch_norm_fusion tests compatible with the BUCK build
system. The tflite import in executors.py is made optional since
tensorflow/tflite_runtime are not available in the BUCK environment. The tests enabled do not rely on the functionality enabled by tflite.

Differential Revision: D93880277
Summary:

When performing QAT with a conv layer (bias=False) followed by batch norm, the fusion process introduces a bias after observers are attached, so the bias remains unquantized. This PR introduces a new pass to find such biases, compute the correct scale from the input and weight dequantize nodes, and insert proper quantize/dequantize nodes for the bias.  It operates on aten dialect graphs, supporting both plain GraphModules (get_attr nodes) and ExportedPrograms (placeholder nodes)

Differential Revision: D92733079
Summary:

Earlier PR adds support for a pass that quantizes the bias resulting from QAT ConvBN fusion without an initial bias.

This PR adds it to the NXP calibrate_and_quantize method.

Differential Revision: D93904683
@robert-kalmar robert-kalmar added module: nxp Issues related to NXP Neutron NPU delegation and code under backends/nxp/ release notes: nxp Changes to the NXP Neutron backend delegate labels Feb 24, 2026
Copy link
Contributor

@larryliu0820 larryliu0820 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review automatically exported from Phabricator review in Meta.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. fb-exported meta-exported module: nxp Issues related to NXP Neutron NPU delegation and code under backends/nxp/ release notes: nxp Changes to the NXP Neutron backend delegate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants